package com.yellowpage.ca.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 字典表POJO
 * 
 * @author 黄敏华
 * 
 */
@Entity
@Table(name = "CA_DICTIONARY")
public class Dictionary implements java.io.Serializable {

	// Sequence生成的主键
	private Long id;
	private String dictValue;
	private String dictName;
	private String dictType;

	public Dictionary() {
	}

	public Dictionary(String dictValue, String dictName, String dictType) {
		this.dictValue = dictValue;
		this.dictName = dictName;
		this.dictType = dictType;
	}

	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "DICT_VALUE", length = 64)
	public String getDictValue() {
		return dictValue;
	}

	public void setDictValue(String dictValue) {
		this.dictValue = dictValue;
	}

	@Column(name = "DICT_NAME", length = 64)
	public String getDictName() {
		return dictName;
	}

	public void setDictName(String dictName) {
		this.dictName = dictName;
	}

	@Column(name = "DICT_TYPE", length = 64)
	public String getDictType() {
		return dictType;
	}

	public void setDictType(String dictType) {
		this.dictType = dictType;
	}

}
